# Contributor: knuxify <knuxify@gmail.com>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=maui
pkgname=mauikit-documents
pkgver=3.0.2
pkgrel=0
pkgdesc="MauiKit Documents components"
# armhf blocked by mauikit -> qt5-qtdeclarative
arch="all !armhf"
url="https://mauikit.org/"
license="GPL-2.0-or-later"
depends="
	kirigami2
	qt5-qtbase-sqlite
	"
makedepends="
	extra-cmake-modules
	karchive5-dev
	kcoreaddons5-dev
	kfilemetadata5-dev
	kguiaddons5-dev
	ki18n5-dev
	kiconthemes5-dev
	kio5-dev
	mauikit
	mauikit-dev
	qt5-qtbase-dev
	poppler-qt5-dev
	samurai
	zlib-dev
	"
subpackages="$pkgname-dev $pkgname-lang"
_repo_url="https://invent.kde.org/maui/mauikit-documents.git"
source="https://download.kde.org/stable/maui/mauikit-documents/$pkgver/mauikit-documents-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=ON \
		$crossopts
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
0f556f0f2e8215e95bb898b970a090fa25f8372f46364e85d42cf4f81f71c17f08a4a905c71390048d06c0f7f500647678382975fd65d49d29a3cdb8bb5f5770  mauikit-documents-3.0.2.tar.xz
"
